TGRIND
Section: Misc. Reference Manual Pages (1
)
Index
Return to Main Contents
NAME
tgrind - grind nice program listings using TeX
SYNOPSIS
tgrind
[
-f
] [
-
] [
-n
] [
-h
header
] [
-d
<description file>
] [
-l<language>
]
name ...
DESCRIPTION
Tgrind
formats program sources in a nice style using
TeX(1).
Comments are placed in italics, keywords in bold face and strings in
typewriter font.
Source file line numbers appear in the right margin (every 10 lines).
The start of a function is indicated by the function name in large
type in the right margin.
In regular mode
tgrind
processes its input file(s) and passes them to
TeX(1)
for formating and output.
In format mode (i.e., when the
-f
flag is used),
tgrind
processes its input file(s) and writes the result to standard output.
This output can be saved for later editting, inclusion in a larger
document, etc.
The options are:
- -f
-
forces format mode
- -
-
take input from standard input
- -n
-
don't boldface keywords
- -h
-
specifies text to go on the left side of every output page (default is none)
- -d
-
specifies the language definitions file (default is /usr/local/lib/vgrindefs)
- -l
-
specifies the language to use. Currently known are PASCAL (-lp), RATFOR (-lr),
Modula-2 (-lm2), MODEL (-lm), C (-lc or the default), ISP (-li),
Yacc (-ly), Prolog (-lprolog), Icon (-lI), TeX (-ltex), CSH (-lcsh), and
Bourne Shell (-lsh).
FILES
/usr/local/lib/tfontedprpreprocessor
/usr/local/lib/vgrindefslanguage descriptions
AUTHOR
Van Jacobson, Lawrence Berkeley Laboratory (based on "vgrind"
by Dave Presotto & William Joy of UC Berkeley).
SEE ALSO
tex(1), vgrind(1), vgrindefs(5)
BUGS
The marginal-function-name mechanism depends on the quality
of the language description in
vgrindefs.
The distributed
vgrindefs
fails to recognize many legal C function declarations.
Arbitrary formatting styles for programs mostly look bad.
The use of spaces to align source code often fails miserably (because
of the variable width output font). If you plan to
tgrind
your program, try to use tabs.
The indexing option of
vgrind
is missing. However, nice indices can be generated using the
-v
option of
ctags
together with appropriate TeX macros.
The
-f
flag means different things to
tgrind
and
vgrind.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- FILES
-
- AUTHOR
-
- SEE ALSO
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 23:11:31 GMT, September 29, 2022